package com.atguigu.self.gulimall.product.service;

import com.atguigu.self.gulimall.product.entity.ProductAttrValueEntity;
import com.atguigu.self.gulimall.product.vo.AttrGroupRelationVo;
import com.atguigu.self.gulimall.product.vo.AttrRespVo;
import com.atguigu.self.gulimall.product.vo.AttrVo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.atguigu.self.common.utils.PageUtils;
import com.atguigu.self.gulimall.product.entity.AttrEntity;

import java.util.List;
import java.util.Map;

/**
 * 商品属性
 *
 * @author lixinyang
 * @email lixinyang@gmail.com
 * @date 2021-02-06 14:29:45
 */
public interface AttrService extends IService<AttrEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 新增属性
     *
     * @param attr
     */
    void saveAttr(AttrVo attr);

    PageUtils queryBaseAttrPage(Map<String, Object> params, Long catelogId, String attrType);

    AttrRespVo getAttrInfo(Long attrId);

    /**
     * 规则参数(属性)表更新
     *
     * @param attr
     */
    void updateAttr(AttrVo attr);

    /**
     * 查询出当前分组下的所有属性
     *
     * @param attrgroupId
     * @return
     */
    List<AttrEntity> getRelationAttr(Long attrgroupId);

    void deleteRelation(AttrGroupRelationVo[] vos);

    /**
     * 获取当前分组没有关联的所有属性
     *
     * @param params
     * @param attrgroupId
     * @return
     */
    PageUtils getNoRelationAttr(Map<String, Object> params, Long attrgroupId);


}

